import { createApp } from 'vue'
import { globalRegister } from './global'
import 'normalize.css'
import './assets/css/index.css'
import 'element-plus/dist/index.css'

// import './service/axios_demo.ts'

import App from './App.vue'
import router from './router'
import store from './store'
import { setupStore } from './store'
// import '@/utlis/background.js'
setupStore()

const app = createApp(App)

// globalRegister(app)

// 定义全局属性
app.use(globalRegister)
app.use(router)
app.use(store)

// app.use(ElementPlus)
app.mount('#app')

// console.log(VUE_APP_BASE_NAME)

// hyRequest.request({
//   url: '/home/multidata',
//   method: 'GET',
//   interceptors: {
//     requestInterceptor: (config) => {
//       console.log('单独请求的config')
//       return config
//     },
//     reponseInterceptor: (res) => {
//       console.log('单独响应的response')
//       return res
//     }
//   }
// })

// hyRequest
//   .request<DataType>({
//     url: '/home/multidata',
//     method: 'GET',
//     showLoading: true
//   })
//   .then((res) => {
//     console.log(res)
//   })
